import 'dart:ui';

import 'package:flutter/material.dart';

class Global {
  static Global instance = Global();

  /// 屏幕信息
  static MediaQueryData mediaQueryData = MediaQueryData.fromWindow(window);

  /// 屏幕方向 LANDSCAPE\PORTRAIT
  static String screenOrientation = "LANDSCAPE";

  /// Whether horizontal screen 是否横屏
  /// ignore: non_constant_identifier_names
  static bool get WHS {
    bool result = true;
    switch (screenOrientation) {
      case "PORTRAIT":
        result = false;
        break;
      default:
        result = true;
    }
    return result;
  }

  Future init() async {}
}
